package com.iqiyi.pps.epg.core.model.program;

import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;

import javax.persistence.*;
import java.sql.Timestamp;

/**
 * Created by karkarrotxu on 2018/3/5.
 */
@Entity
@Table(name = "feed_data")
@Cache(usage = CacheConcurrencyStrategy.NONE)
public class FeedData {
    private long id;
    private long programQipuId;
    private int offLine;
    private int status; // 1
    private Timestamp addTime = new Timestamp(System.currentTimeMillis());
    private Timestamp updateTime;

    public static final int STATUS_WAIT = 0;
    public static final int STATUS_COMPLETE = 1;
    public static final int STATUS_INTERRUPT = 999;

    @Id
    @GeneratedValue(strategy = GenerationType.AUTO)
    public long getId() {
        return id;
    }

    public void setId(long id) {
        this.id = id;
    }

    @Column(name = "program_qipu_id")
    public long getProgramQipuId() {
        return programQipuId;
    }

    public void setProgramQipuId(long programQipuId) {
        this.programQipuId = programQipuId;
    }

    @Column(name = "status")
    public int getStatus() {
        return status;
    }

    public void setStatus(int status) {
        this.status = status;
    }
    @Column(name = "off_line")
    public int getOffLine() {
        return offLine;
    }

    public void setOffLine(int offLine) {
        this.offLine = offLine;
    }

    @Column(name = "add_time")
    public Timestamp getAddTime() {
        return addTime;
    }

    public void setAddTime(Timestamp addTime) {
        this.addTime = addTime;
    }

    @Column(name = "update_time", insertable = false, updatable = false)
    public Timestamp getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Timestamp updateTime) {
        this.updateTime = updateTime;
    }
}
